/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package factorymethod;

import java.util.Random;

/**
 *
 * @author jccaicedo
 */
public class Forms {

    public static void main(String[] args){
        FormCreator[] fc = {new CrearEgresos(), new CrearIngresos()};

        Random rand = new Random();
        for(int i = 0; i < 100; i++){
            int k = rand.nextInt(2);
            Formulario f = fc[k].crearFormulario();
            System.out.println("Titulo: " + f.getNombre() + " campos " + f.getNumCampos());
        }
    }

}
